/**
 * 
 */
package com.ccqlk.attendance.repository.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ccqlk.attendance.model.AttendanceLog;
import com.ccqlk.attendance.repository.dbservice.AttendanceLogMapper;
import com.ccqlk.attendance.repository.service.base.BaseServiceImpl;

/**
 * Copyright 2015-2018 重庆鲁控科技有限公司<br>
 * 文件标题: AttendanceLogService<br>
 * 文件说明: 出勤记录<br>
 * @author ZhangYinxian 348893009@qq.com<br>
 * 创建时间 2016年5月27日 上午11:11:37<br>
 */
@Service
public class AttendanceLogService extends BaseServiceImpl<AttendanceLog, Integer> {

	private AttendanceLogMapper attendanceLogMapper;
	
	@Autowired
	public AttendanceLogService(AttendanceLogMapper attendanceLogMapper) {
		super(attendanceLogMapper);
		this.attendanceLogMapper = attendanceLogMapper;
	}

	/**
	 * @param userCode
	 * @return
	 */
	public int countByUserCode(String userCode) {
		AttendanceLog attendanceLog = new AttendanceLog();
		attendanceLog.setUserCode(userCode);
		return attendanceLogMapper.selectCount(attendanceLog);
	}

}
